Optimal. Leaf size=60 \[ \frac{2 \tan (c+d x)}{a^2 d (a \sec (c+d x)+a)}-\frac{x}{a^3}-\frac{\tan ^3(c+d x)}{3 d (a \sec (c+d x)+a)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.173323, antiderivative size = 71, normalized size of antiderivative = 1.18, number of steps used = 12, number of rules used = 7, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3888, 3886, 3473, 8, 2606, 2607, 30} \[ \frac{4 \cot ^3(c+d x)}{3 a^3 d}-\frac{\cot (c+d x)}{a^3 d}-\frac{4 \csc ^3(c+d x)}{3 a^3 d}+\frac{3 \csc (c+d x)}{a^3 d}-\frac{x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3886
Rule 3473
Rule 8
Rule 2606
Rule 2607
Rule 30
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac{\int \cot ^4(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac{\int \left (-a^3 \cot ^4(c+d x)+3 a^3 \cot ^3(c+d x) \csc (c+d x)-3 a^3 \cot ^2(c+d x) \csc ^2(c+d x)+a^3 \cot (c+d x) \csc ^3(c+d x)\right ) \, dx}{a^6}\\ &=-\frac{\int \cot ^4(c+d x) \, dx}{a^3}+\frac{\int \cot (c+d x) \csc ^3(c+d x) \, dx}{a^3}+\frac{3 \int \cot ^3(c+d x) \csc (c+d x) \, dx}{a^3}-\frac{3 \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac{\cot ^3(c+d x)}{3 a^3 d}+\frac{\int \cot ^2(c+d x) \, dx}{a^3}-\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,\csc (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \left (-1+x^2\right ) \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=-\frac{\cot (c+d x)}{a^3 d}+\frac{4 \cot ^3(c+d x)}{3 a^3 d}+\frac{3 \csc (c+d x)}{a^3 d}-\frac{4 \csc ^3(c+d x)}{3 a^3 d}-\frac{\int 1 \, dx}{a^3}\\ &=-\frac{x}{a^3}-\frac{\cot (c+d x)}{a^3 d}+\frac{4 \cot ^3(c+d x)}{3 a^3 d}+\frac{3 \csc (c+d x)}{a^3 d}-\frac{4 \csc ^3(c+d x)}{3 a^3 d}\\ \end{align*}
Mathematica [B] time = 0.380248, size = 125, normalized size = 2.08 \[ -\frac{\sec \left (\frac{c}{2}\right ) \sec ^3\left (\frac{1}{2} (c+d x)\right ) \left (351 \sin \left (c+\frac{d x}{2}\right )-277 \sin \left (c+\frac{3 d x}{2}\right )-3 \sin \left (2 c+\frac{3 d x}{2}\right )+180 d x \cos \left (c+\frac{d x}{2}\right )+60 d x \cos \left (c+\frac{3 d x}{2}\right )+60 d x \cos \left (2 c+\frac{3 d x}{2}\right )-471 \sin \left (\frac{d x}{2}\right )+180 d x \cos \left (\frac{d x}{2}\right )\right )}{480 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.082, size = 56, normalized size = 0.9 \begin{align*} -{\frac{1}{3\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+2\,{\frac{\tan \left ( 1/2\,dx+c/2 \right ) }{d{a}^{3}}}-2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.63608, size = 97, normalized size = 1.62 \begin{align*} \frac{\frac{\frac{6 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{3}} - \frac{6 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.09627, size = 200, normalized size = 3.33 \begin{align*} -\frac{3 \, d x \cos \left (d x + c\right )^{2} + 6 \, d x \cos \left (d x + c\right ) + 3 \, d x -{\left (7 \, \cos \left (d x + c\right ) + 5\right )} \sin \left (d x + c\right )}{3 \,{\left (a^{3} d \cos \left (d x + c\right )^{2} + 2 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.65397, size = 68, normalized size = 1.13 \begin{align*} -\frac{\frac{3 \,{\left (d x + c\right )}}{a^{3}} + \frac{a^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 6 \, a^{6} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{9}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]